Codespaces and VS Code

Megumi Oshima & Nicholas Ducharme-Barth

January 2025

What is Codespaces?

  • Development environment that is hosted in the cloud on GitHub.com
  • You control the specs of the machine!
  • Connected to your repository

Why use it?

  • Containerized environment
  • Anyone using it is working in the same environment
    • Same OS
    • Same software
    • Same package versions

“It works on my computer!”

Set Up

To set up a Codespace,

  1. Create a .devcontainer folder inside your repository
  1. Add a devcontainer.json file to that folder
  1. Set up devcontainer.json how you like (packages, software, extensions, etc.)
  1. Add a setup.r file if needed

See the devcontainer.json we are using here

Spin up the Codespace

On the main page of the repository, “Code” -> “Create codespace on main”

Let’s build our codespaces!

VS Code

VS Code is a free IDE software used for writing and running code